package review;

public class Person {
    public String name;
    protected int age;
    String gender;
    private String backPassword;

    public Person(String name, int age, String gender, String backPassword) {
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.backPassword = backPassword;
    }

    public static void main(String[] args) {
        Person p = new Person("张三", 20, "男", "123456");

        // 不同访问权限修饰的成员  在同一个类中都可以被访问
        // 访问权限主要限制的是 不能在类外(其他类)被使用
        p.name = "李三";
        p.age = 21;
        p.gender = "女";
        p.backPassword = "23456";
    }
}
